<template>
    <div class='goodsdescription'>
        <!-- 标题 -->
       <div class="descTitle">
            <h3>{{descinfo.title}}</h3>
        </div>
        <hr>
        <!-- 详情 -->
        <div class="descContent" v-html="descinfo.content"></div>
    </div>
</template>

<script>
import { Toast } from 'mint-ui'
export default {
    data(){
        return {
           id: this.$route.params.descid,
           descinfo:[]
        }
    },
    methods:{
        // 获取图文介绍
        getgoodsinfo(){
            this.$http.get('api/goods/getdesc/'+this.id).then(result=>{
                console.log(1)
                if(result.body.status === 0){
                    this.descinfo = result.body.message[0]
                } else {
                    Toast('获取商品参数失败')
                }
            })
        }
        
    },
    created(){
        this.getgoodsinfo()
    }
}

</script>

<style lang="less">
.goodsdescription{
    .descTitle{
        h3 {
            color:blue;
        }
    }
    .descContent{
        img {
            width: 100%;
        }
    }

}

</style>